//
//  SYTopView.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/11.
//  Copyright © 2019年 李文强. All rights reserved.
//

#import "SYTopView.h"

@interface SYTopView ()



@end


@implementation SYTopView

- (instancetype)init {
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor colorWithHexString:@"#EEEEEE"];
        [self initSubView];
    }
    return self;
}

- (void)initSubView {
    [self addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self);
    }];

    [self addSubview:self.fgxView];
    [self.fgxView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self);
        make.height.mas_equalTo(1);
    }];
}


- (UILabel *)titleLab {
    if (!_titleLab) {

        _titleLab = [UILabel titleColour:TITLECOLOR
                              titleFount:16
                                pingfang:@"PingFang-SC-Regular"
                               alignment:NSTextAlignmentCenter
                               titleLine:1];
    }
    return _titleLab;
}

- (UIView *)fgxView {
    if (!_fgxView) {
        _fgxView = [UIView new];
        _fgxView.backgroundColor = [UIColor colorWithHexString:@"#CCCCCC"];
    }
    return _fgxView;
}



@end
